import java.util.ArrayList;
import java.util.List;
import java.util.Random;

/**
 * 字符串重复统计
 */
public class Problem1 {

    public static void main(String[] args) {
        System.out.println(anlyString("AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT"));
    }


    /**
     * 字符串重复统计
     */
    private static List anlyString(String arg){
        List list = new ArrayList();
        char[] chars = arg.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            for (int j = i +10; j <chars.length;j++){
                int m = i;
                int n = j;
                while (chars[m] == chars[n]){
                    m++;
                    n++;
                }
                if (m == i+ 10){
                    list.add(arg.substring(i,i+10));
                }
            }
        }
        return list;
    }
}
